/*
 * Charges.h
 *
 *  Created on: May 20, 2011
 *      Author: marchi
 */

#ifndef CHARGES_H_
#define CHARGES_H_

#include "Atoms.h"

class Charges: public Atoms {
	real * q;
public:
	Charges(): Atoms(){q=NULL;};
	Charges(const int nint):
		Atoms(nint){
		q=NULL;
		if(nint)
			q=new real [nr];
	};
	Charges(const AtomIndex & id):
		Atoms(id){
		nr=id.getN();
		q=NULL;
		if(nr)
			q=new real [nr];
	};
	Charges(const Charges &);
	virtual ~Charges();
	Charges & operator=(const Charges &);
	void setQ(const real *, const int );
	void setQ(const real *, const AtomIndex &);
	real getQ(const int i) const {return q[i];};
	bool test(){if(q==NULL) return FALSE;else return TRUE;}
};

#endif /* CHARGES_H_ */
